package com.yuwei.router

import com.alibaba.android.arouter.facade.Postcard
import com.alibaba.android.arouter.facade.callback.NavigationCallback
import com.alibaba.android.arouter.launcher.ARouter
import com.tencent.smtt.utils.r
import com.yuwei.base.RoutePath

/**
 * 局部降级策略
 */
class LocalDegradeCallback(private val path : String = "",private val group : String = "") : NavigationCallback{
    /**
     * 匹配到目标页面
     */
    override fun onFound(postcard: Postcard?) {

    }

    /**
     * 没有匹配到目标页面
     */
    override fun onLost(postcard: Postcard?) {

    }

    /**
     * 页面跳转成功
     */
    override fun onArrival(postcard: Postcard?) {
        ARouter.getInstance().build(RoutePath.EMPTY_ACTIVITY).navigation()
    }

    /**
     * 页面跳转被拦截
     */
    override fun onInterrupt(postcard: Postcard?) {

    }
}